using System;
using System.IO;

namespace LS.Digitize
{
    public sealed class ByteArraySerializer: PrimitiveSerializer<byte[]>
    {
        public ByteArraySerializer() : base()
        {
            
        }
        
        public override void WriteData(IWriter writer, byte[] obj)
        {
            writer.WritePrimitive(obj);
        }

        public override byte[] ReadData(IReader reader)
        {
            return reader.ReadByteArray();
        }
    }
}